home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SuperHack
/
SuperHack CD.bin
/
HARDWARE
/
C64_PLA.ZIP
/
C64_PLA.EQU
Wrap
Text File
|
1995-08-22
|
11KB
|
315 lines
The C64 PLA logic equations
On 30th August 1994, Jens Schoenfeld (sysop@nostlgic.oche.de) posted
the raw data from the C64 PLAs in the German newsgroup
z-netz.rechner.c64+c128.allgemein. He read the chip with an EPROM
programmer device as a 27512 EPROM using a home-built adaptor.
several others tried to manually create the logic equations,
independent of each other. I was the first one who completed the
work. Especially the CASRAM equations took lots of time. My friend
Andreas Boose (boose@unixserv.rz.fh-hannover.de) helped me to optimize
the CASRAM equations a bit.
There was no actual use for the equations until Mark Smith
(mark@te.rl.ac.uk) needed them in order to burn a replacement PLA for
his C64. He formatted our truth table entries (commented out with
double quotation marks in the code below) so that Abel accepts them,
and created a JEDEC file that can be used to burn 82S100 chips.
boose@unixserv.rz.fh-hannover.de, fdorado@pyramid.com
Subject: C64 PLAs!
Date: Thu, 11 May 95 11:19:02 BST
Thanks very much to everyone who helped me.
I managed to get my C64 working again last night!
Thanks to the truth tables and equations and all that hard work reducing
the truth tables done by various wonderful people, I produced this ABEL
file which I compiled using the ABEL software package and produced the
JEDEC file underneath the Abel file. I used the JEDEC file to program up
a fresh 82S100, slaped it in my machine and hey presto, it worked!!!!!!
It would be nice if these files could end up at ftp.funet.fi so that
anyone else who wants to can produce new PLA chips for the old C64s.
All they need is the JEDEC file, but, as the 82S100 is obsolete and difficult
to get hold of, I've included the Abel file aswell so that the same equations
can be put into any modern chip that's big enough.
Many thanks again!
It's alive....!
*****Abel file:
module c64pla
title 'PLA chip in old Commodore 64'
mychip device 'F100';
" Device is a Signetics/Philips/Mullard 82S100
" Use group optimisation to enable equations to fit in device
A13,A14,A15,_VA14,_CHAREN,_HIRAM,_LORAM,_CAS pin 2,3,4,5,6,7,8,9;
VA12,VA13,_GAME,_EXROM,R__W,_AEC,BA,A12 pin 20,21,22,23,24,25,26,27;
ROMH,ROML,I_O,GR_W,CHAROM,KERNAL,BASIC,CASRAM pin 10,11,12,13,15,16,17,18;
H,L,X,Z,Ck = 1,0,.X.,.Z.,.C.;
"The order of the terms is as follows:
" _GAME _EXROM _CAS _CHAREN
" _HIRAM _LORAM _VA14 VA13
" VA12 BA _AEC R__W
" A15 A14 A13 A12
" Truth tables (any rule true => signal = 0)
" ROML: explanation:
" x0xx 11xx xx01 100x
" 01xx xxxx xx0x 100x
!ROML = (!_EXROM & _HIRAM & _LORAM & !_AEC & R__W & A15 & !A14 & !A13) #
(!_GAME & _EXROM & !_AEC & A15 & !A14 & !A13);
" ROMH:
" 00xx 1xxx xx01 101x
" 01xx xxxx xx0x 111x
" 01xx xxx1 1x1x xxxx
!ROMH = (!_GAME & !_EXROM & _HIRAM & !_AEC & R__W & A15 & !A14 & A13) #
(!_GAME & _EXROM & !_AEC & A15 & A14 & A13) #
(!_GAME & _EXROM & VA13 & VA12 & _AEC);
" I_O:
" 01xx xxxx xx00 1101
" 01xx xxxx x10x 1101
" xxx1 01xx x10x 1101
" xxx1 1xxx xx00 1101
" xxx1 1xxx x10x 1101
!I_O = (!_GAME & _EXROM & !_AEC & !R__W & A15 & A14 & !A13 & A12) #
(!_GAME & _EXROM & BA & !_AEC & A15 & A14 & !A13 & A12) #
(_CHAREN & !_HIRAM & _LORAM & !_AEC & !R__W & A15 & A14 & !A13 & A12) #
(_CHAREN & !_HIRAM & _LORAM & BA & !_AEC & A15 & A14 & !A13 & A12) #
(_CHAREN & _HIRAM & !_AEC & !R__W & A15 & A14 & !A13 & A12) #
(_CHAREN & _HIRAM & BA & !_AEC & A15 & A14 & !A13 & A12);
" GR_W:
" xx0x xxxx xx00 1101
!GR_W = (!_CAS & !_AEC & !R__W & A15 & A14 & !A13 & A12);
" CHAROM:
" x0x0 1xxx xx01 1101
" 1xx0 01xx xx01 1101
" 1xx0 1xxx xx01 1101
" 1xxx xx10 1x1x xxxx
!CHAROM = (!_EXROM & !_CHAREN & _HIRAM & !_AEC & R__W & A15 & A14 & !A13 & A12) #
(_GAME & !_CHAREN & !_HIRAM & _LORAM & !_AEC & R__W & A15 & A14 & !A13 & A12) #
(_GAME & !_CHAREN & _HIRAM & !_AEC & R__W & A15 & A14 & !A13 & A12) #
(!_EXROM & _VA14 & !VA13 & VA12 & _AEC) #
(_GAME & _VA14 & !VA13 & VA12 & _AEC);
" KERNAL:
" x0xx 1xxx xx01 111x
" 1xxx 1xxx xx01 111x
!KERNAL = (!_EXROM & _HIRAM & !_AEC & R__W & A15 & A14 & A13) #
(_GAME & _HIRAM & !_AEC & R__W & A15 & A14 & A13);
" BASIC:
" 1xxx 11xx xx01 101x
" CASRAM (_AEC == 1 (videochip)):
" 010x xxx0 xx1x 111x
" 010x xxx0 xx1x 1x01
" 010x xxx0 xx1x x000
!CASRAM = (!_GAME & _EXROM & !_CAS & !VA13 & _AEC & A15 & A14 & A13) #
(!_GAME & _EXROM & !_CAS & !VA13 & _AEC & A15 & !A13 & A12) #
(!_GAME & _EXROM & !_CAS & !VA13 & _AEC & !A14 & !A13 & !A12) #
" 010x xxx1 0x1x 1x01
" 010x xxxx 0x1x 111x
" 010x xxxx 0x1x x000
" 110x xx0x xx1x xxxx
" 110x xxx0 0x1x xxxx
" 110x xxx1 xx1x xxxx
" x00x xx0x xx1x xxxx
" x00x xxx0 0x1x xxxx
" x00x xx11 xx1x xxxx
(!_GAME & _EXROM & !_CAS & VA13 & !VA12 & _AEC & A15 & !A13 & A12) #
(!_GAME & _EXROM & !_CAS & !VA12 & _AEC & A15 & A14 & A13) #
(!_GAME & _EXROM & !_CAS & !VA12 & _AEC & !A14 & !A13 & !A12) #
(_GAME & _EXROM & !_CAS & !_VA14 & _AEC) #
(_GAME & _EXROM & !_CAS & !VA13 & !VA12 & _AEC) #
(_GAME & _EXROM & !_AEC & VA13 & _AEC) #
(!_EXROM & !_CAS & !_VA14 & _AEC) #
(!_EXROM & !_CAS & !VA13 & !VA12 & _AEC) #
(!_EXROM & !_CAS & _VA14 & VA13 & _AEC) #
" CASRAM (_AEC == 0 (processor)):
" 0000 0xxx xx01 1101
" 000x 0xxx x001 x1x1
" 010x xxxx x001 1101
" 1100 xxxx xx00 xxx1
(!_GAME & !_EXROM & !_CAS & !_CHAREN & !_HIRAM & !_AEC & R__W & A15 & A14 & !A13 & A12) #
(!_GAME & !_EXROM & !_CAS & !_HIRAM & !BA & !_AEC & R__W & A14 & A12) #
(!_GAME & _EXROM & !_CAS & !BA & !_AEC & R__W & A15 & A14 & !A13 & A12) #
" 110x 00xx xx0x xxx1
" 110x 0xxx xx01 1x11
" 110x 0xxx xx01 xx10
" 110x xxxx xx00 xx1x
" 110x xxxx xx00 xxx0
" 110x xxxx xx01 0x10
" 110x xxxx xx0x 0xx1
" 110x xxxx xx0x x001
" 110x xxxx xx00 xx00
" 110x xxxx xx01 xx00
(_GAME & _EXROM & !_CAS & !_HIRAM & !_LORAM & !_AEC & A12) #
(_GAME & _EXROM & !_CAS & !_HIRAM & !_AEC & R__W & A15 & A13 & A12) #
(_GAME & _EXROM & !_CAS & !_HIRAM & !_AEC & R__W & A13 & !A12) #
(_GAME & _EXROM & !_CAS & !_AEC & !R__W & A13) #
(_GAME & _EXROM & !_CAS & !_AEC & !R__W & !A12) #
(_GAME & _EXROM & !_CAS & !_AEC & R__W & !A15 & A13 & !A12) #
(_GAME & _EXROM & !_CAS & !_AEC & !A15 & A12) #
(_GAME & _EXROM & !_CAS & !_AEC & !A14 & !A13 & A12) #
(_GAME & _EXROM & !_CAS & !_AEC & !R__W & !A13 & !A12) #
(_GAME & _EXROM & !_CAS & !_AEC & R__W & !A13 & !A12) #
" 1x0x 10xx xx01 101x
" x000 xxxx xx00 1101
" x001 00xx x101 11x1
" x001 00xx xx00 1101
(_GAME & !_CAS & _HIRAM & !_LORAM & !_AEC & R__W & A15 & !A14 & A13) #
(!_EXROM & !_CAS & !_CHAREN & !_AEC & !R__W & A15 & A14 & !A13 & A12) #
(!_EXROM & !_CAS & _CHAREN & !_HIRAM & !_LORAM & BA & !_AEC & R__W & A15 & A14 & A12) #
(!_EXROM & !_CAS & _CHAREN & !_HIRAM & !_LORAM & !_AEC & !R__W & A15 & A14 & !A13 & A12) #
" x00x 00xx xx01 1101
" x00x 0xxx xx01 10xx
" x00x 0xxx xx01 x111
" x00x 0xxx xx01 x1x0
" x00x 10xx xx01 100x
" x00x xxxx xx00 0x01
" x00x xxxx xx00 x001
" x00x xxxx xx00 xx11
" x00x xxxx xx00 xxx0
" x00x xxxx xx01 0xxx
" x00x xxxx xx01 x100
" xx01 xxxx x001 1101
" xx0x xxxx xx0x 0000
(!_EXROM & !_CAS & !_HIRAM & !_LORAM & !_AEC & R__W & A15 & A14 & !A13 & A12) #
(!_EXROM & !_CAS & !_HIRAM & !_AEC & R__W & A15 & !A14) #
(!_EXROM & !_CAS & !_HIRAM & !_AEC & R__W & A14 & A13 & A12) #
(!_EXROM & !_CAS & !_HIRAM & !_AEC & R__W & A14 & !A12) #
(!_EXROM & !_CAS & _HIRAM & !_LORAM & !_AEC & R__W & A15 & !A14 & !A13) #
(!_EXROM & !_CAS & !_AEC & !R__W & !A15 & !A13 & A12) #
(!_EXROM & !_CAS & !_AEC & !R__W & !A14 & !A13 & A12) #
(!_EXROM & !_CAS & !_AEC & !R__W & A13 & A12) #
(!_EXROM & !_CAS & !_AEC & !R__W & !A12) #
(!_EXROM & !_CAS & !_AEC & R__W & !A15) #
(!_EXROM & !_CAS & !_AEC & R__W & A14 & !A13 & !A12) #
(!_CAS & _CHAREN & !BA & !_AEC & R__W & A15 & A14 & !A13 & A12) #
(!_CAS & !_AEC & !A15 & !A14 & !A13 & !A12);
end c64pla
*****The JEDEC file:
ABEL 4.30 Data I/O Corp. JEDEC file for: F100 V9.0
Created on: Tue May 9 15:34:50 1995
PLA chip in old Commodore 64
*
QP28* QF1928* QV0* F0*
X0*
NOTE Table of pin names and numbers*
NOTE PINS A13:2 A14:3 A15:4 _VA14:5 _CHAREN:6 _HIRAM:7 _LORAM:8 _CAS:9*
NOTE PINS VA12:20 VA13:21 _GAME:22 _EXROM:23 R__W:24 _AEC:25 BA:26 A12:27*
NOTE PINS ROMH:10 ROML:11 I_O:12 GR_W:13 CHAROM:15 KERNAL:16 BASIC:17 CASRAM:18*
L0000 1111011111010101111110011011111101011111*
L0040 1101011111011010111110011011111101111101*
L0080 1111011111010101111110011101111101011111*
L0120 1101011111011001111110011101111100111111*
L0160 1111111111100111111111110110111101111111*
L0200 1111111111010101111110110110111101111110*
L0240 1111111111111001111111110110111101111111*
L0280 1111011111011001111110011010111101111110*
L0320 1111111111011010111110110110111101111101*
L0360 1111111111111111111101110110010101111110*
L0400 1111111111101111011111110110111101111111*
L0480 1111111111110110101111110110111101111111*
L0520 1111111111010110010110110110111101111011*
L0560 1111010111010110011110101111111101111011*
L0600 1101110111010110011110101111111101111011*
L0640 1111010111010110010110111111111101111011*
L0680 1101110111010110010110111111111101111011*
L0720 1111011011010110011110011011111101101111*
L0760 1111011011010110011110011101111101101111*
L0800 1101111011010110011110011101111101101111*
L0840 0111111111111111111111111111111101111111*
L0880 1011111111010110011110101111111111110111*
L0920 1111111101111111111101110101011101111111*
L0960 1111111101111111111101111011100101101111*
L1000 1111111101111111111101111101100101101111*
L1040 0000000000000000000000000000000011111111*
L1080 0000000000000000000000000000000011111111*
L1120 0000000000000000000000000000000011111111*
L1160 0000000000000000000000000000000011111111*
L1200 0000000000000000000000000000000011111111*
L1240 0000000000000000000000000000000011111111*
L1280 0000000000000000000000000000000011111111*
L1320 0000000000000000000000000000000011111111*
L1400 0000000000000000000000000000000011111111*
L1440 0000000000000000000000000000000011111111*
L1480 0000000000000000000000000000000011111111*
L1520 0000000000000000000000000000000011111111*
L1560 0000000000000000000000000000000011111111*
L1600 0000000000000000000000000000000011111111*
L1640 0000000000000000000000000000000011111111*
L1680 0000000000000000000000000000000011111111*
L1720 0000000000000000000000000000000011111111*
L1760 0000000000000000000000000000000011111111*
L1800 0000000000000000000000000000000011111111*
L1840 0000000000000000000000000000000011111111*
L1880 0000000000000000000000000000000011111111*
L1920 01111111*
C8028*
20EC